import React, { useState, useEffect } from 'react';
import {View,StyleSheet} from 'react-native';
import {Text,Stack  ,Image,Center,Button} from 'native-base'
import LinearGradinet from 'react-native-linear-gradient';

const Advertisement = () => {
    const [mh,sehMh]=useState('10')
    const [mhz,sehMhz]=useState('10000')
    const [mhsl,setMhsl]=useState('1')
    const [mhslz,setMhslz]=useState('3')
  return (
    <LinearGradinet colors={['#9BD5FC',  '#589CF6']} style= {styles.advice}>
    <Stack  direction="row"  space={3} style={styles.licont}>
     <View> 
        <Image width={94} height={94}
                source={require('../../../../assets/home/Vb.png')}
                alt="搜索"
              />
              </View>
     <View style={{marginTop:10,marginLeft:9}}>
        <Text style={styles.mhtext}>今日可开启{mh}个盲盒</Text>
        <Text style={styles.mhtext}> 剩余盲盒数量{mhz}个</Text>
        </View>
     <View style={styles.liright} >
      <Button style={styles.libtn}>
        <Text style={styles.libtntext}>立即开启</Text>
        </Button>
      <Text color={'#666666'} fontSize={11} >{mhsl}/{mhslz}</Text>
        </View>
    </Stack>
    </LinearGradinet>
  );
};

const styles=StyleSheet.create({
    advice:{
        // width:'100%',
       marginLeft:15,
       marginRight:15,
        padding:10,
        borderRadius:10,
        overflow:'hidden',
        justifyContent:'center',
        alignItems:'center',
        overflow:'hidden'
    },
    licont:{
        margin:0,
      overflow:'hidden',
      width:'100%',
      padding:8,
        backgroundColor:'#ffffff'
    },
    mhtext:{
        marginTop:10,
        color:'#666666',
        fontSize:11,
    },
    liright:{
        justifyContent:'center',
        alignItems:'center',
        marginLeft:15
    },
    libtn:{
        width:79,
        height:28,
        borderRadius:14,
        backgroundColor:'#F35434',
        padding:0,
        marginBottom:5,
    },
    libtntext:{
        color:'#ffffff',
        fontSize:11,
        height:28,
        lineHeight:28,
        margin:0

    }
   
})
export default Advertisement;